<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class Member extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('member', function (Blueprint $table) {
            $table->id();
            $table->char('international_area_code',32)->default('')->comment('国际区号');
            $table->char('mobile', 32)->default('')->comment('手机号');
            $table->string('nickname', 32)->default('')->comment('昵称');
            $table->string('email')->default('')->comment('邮箱');
            $table->string('invite_code')->default('')->comment('邀请码');
            $table->string('signature')->default('')->comment('签名');
            $table->tinyInteger('sex')->default(0)->comment('性别');
            $table->tinyInteger('is_vip')->default(0)->comment('是否会员');
            $table->timestamp('birthday')->nullable()->comment('生日');
            $table->tinyInteger('status')->default(0)->comment('状态');
            $table->timestamp('last_login_at')->comment('最后登录时间');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
